<template>
  <div class="app-container">
    <div class="filter-container">
    </div>
    <el-table
      :key="tableKey"
      v-loading="listLoading"
      :data="list"
      border
      fit
      highlight-current-row
      style="width: 100%;"
      @sort-change="sortChange"
    >
      <el-table-column label="名称" prop="id" sortable="custom" align="center" min-width="140" :class-name="getSortClass('id')">
        <template slot-scope="{row}">
          <span>{{ row.sn }}</span>
        </template>
      </el-table-column>
      <el-table-column label="状态" max-width="150px">
        <template slot-scope="{row}">
          <span class="link-type" @click="handleShow(row)">{{ row.title }}</span>
        </template>
      </el-table-column>
      <el-table-column label="创建时间" class-name="status-col" width="180">
        <template slot-scope="{row}">
            {{ row.updated_at }}
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total>0" :total="total" :page.sync="listQuery.start" :limit.sync="listQuery.perpage" @pagination="getList" />

  </div>
</template>

<script>
import { getNodeDetail  } from '@/api/foundation/node'
import { getMissionList  } from '@/api/foundation/mission'
import waves from '@/directive/waves' // waves directive
import { parseTime } from '@/utils'
import Pagination from '@/components/Pagination' // secondary package based on el-pagination

export default {
  name: 'knowledgeAdmin',
  components: { Pagination },
  directives: { waves },
  filters: {
  },
  data() {
    return {
      listLoading: true,
      nodeData:{}
    }
  },
  created() {
    let nodeID = this.$route.query && this.$route.query.nodeID
    nodeID = parseInt(nodeID)
    getNodeDetail({
      "nodeID":nodeID
    }).then(response => {
      if (response.status === 200) {
        this.nodeData = response.data
      } else {
        this.$message({
          message: response.msg,
          type: 'error'
        })
      }
    })
  },
  methods: {
  }
}
</script>
